A Bar chart using the tooltipsHotspotXonly option
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.tooltips.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="700" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
var bar = new RGraph.Bar({
id: 'cvs',
data: [12,18,10,9,6,20,18],
options: {
labels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
tooltips: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
tooltipsHotspotXonly: true,
tooltipsEvent: 'mousemove',
shadow: false,
colors: ['red'],
strokestyle: 'rgba(0,0,0,0)',
scaleZerostart: true,
textAccessible: true,
textAccessiblePointerevents: false
}
}).draw();
</script>